<template>
	<u-modal :show="showBox"   :closeOnClickOverlay="true" :showCancelButton="true"   @confirm="confirmBox"   @cancel="()=>{this.showBox=false}">
		<view class="slot-content">
			<view class="form_box" >
				<uni-forms ref="form" :rules="rules" >

					<uni-forms-item  label="施工师傅" name="worker">
						<view class="form_item_input">
							<picker @change="selectChange" data-key="worker" :value="workerIndex" :range="workerList" :range-key="'name'">
								<view style="padding-left: 20rpx;line-height: 60rpx;" class="uni-input">{{workerList[workerIndex].name}}</view>
							</picker>
						</view>
					</uni-forms-item>
					
					
					<uni-forms-item  label="材料数量" name="material_nums">
						<uni-easyinput type="text"  v-model="formData.material_nums" maxlength="250" placeholder="请输入材料数量"></uni-easyinput>
					</uni-forms-item>
					
					<uni-forms-item  label="材料金额" name="material_cost">
						<uni-easyinput type="text"  v-model="formData.material_cost" maxlength="250" placeholder="请输入材料金额"></uni-easyinput>
					</uni-forms-item>
				</uni-forms>
				<u-modal content="确定要提交么？" :show="showConfirm" showCancelButton closeOnClickOverlay @confirm="confirmForm" @cancel="()=>{this.showConfirm=false}"  ></u-modal>
			</view>
		</view>
	</u-modal>
</template>

<script>
	import {index} from './material-info.js';
	export default {name: 'materialInfo',mixins: [index]}
</script>
<style>
	@import 'material-info.css';
</style>
